﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_DevMake数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_DevMakeMod
    {
        /// <summary>
        /// 初始化Base_DevMake数据模型对象
        /// </summary>
        public Base_DevMakeMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_DevMake数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="startDate">startDate</param>
        /// <param name="endDate">endDate</param>
        /// <param name="objDate">objDate</param>
        /// <param name="ctime">ctime</param>
        public Base_DevMakeMod(long id,DateTime startDate,DateTime endDate,DateTime objDate,DateTime ctime)
        {
            //给id字段赋值
            this.Id = id;
            //给startDate字段赋值
            this.StartDate = startDate;
            //给endDate字段赋值
            this.EndDate = endDate;
            //给objDate字段赋值
            this.ObjDate = objDate;
            //给ctime字段赋值
            this.Ctime = ctime;
        }
        /// <summary>
        /// 初始化Base_DevMake数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="startDate">startDate</param>
        /// <param name="endDate">endDate</param>
        /// <param name="objDate">objDate</param>
        /// <param name="ctime">ctime</param>
        /// <param name="preKey">PreKey</param>
        public Base_DevMakeMod(long id,DateTime startDate,DateTime endDate,DateTime objDate,DateTime ctime,string preKey)
        {
            //给id字段赋值
            this.Id = id;
            //给startDate字段赋值
            this.StartDate = startDate;
            //给endDate字段赋值
            this.EndDate = endDate;
            //给objDate字段赋值
            this.ObjDate = objDate;
            //给ctime字段赋值
            this.Ctime = ctime;
            //给PreKey字段赋值
            this.PreKey = preKey;
        }
        
		//属性存储数据的变量
        private long _id;
        private DateTime _startDate;
        private DateTime _endDate;
        private DateTime _objDate;
        private DateTime _ctime;
        private string _preKey;
        
        /// <summary>
        /// id
        /// </summary>
        public long Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// startDate
        /// </summary>
        public DateTime StartDate
        {
            get { return this._startDate; }
            set { this._startDate = value; }
        }
        /// <summary>
        /// endDate
        /// </summary>
        public DateTime EndDate
        {
            get { return this._endDate; }
            set { this._endDate = value; }
        }
        /// <summary>
        /// objDate
        /// </summary>
        public DateTime ObjDate
        {
            get { return this._objDate; }
            set { this._objDate = value; }
        }
        /// <summary>
        /// ctime
        /// </summary>
        public DateTime Ctime
        {
            get { return this._ctime; }
            set { this._ctime = value; }
        }
        /// <summary>
        /// PreKey
        /// </summary>
        public string PreKey
        {
            get { return this._preKey; }
            set { this._preKey = value; }
        }
        
        /// <summary>
        /// 对比两个Base_DevMake数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_DevMake数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_DevMake数据模型对象
            Base_DevMakeMod base_DevMakeMod = obj as Base_DevMakeMod;
            //判断是否转换成功
            if (base_DevMakeMod == null) return false;
            //进行匹配属性的值
            return
                //判断id是否一致
                this.Id == base_DevMakeMod.Id &&
                //判断startDate是否一致
                this.StartDate == base_DevMakeMod.StartDate &&
                //判断endDate是否一致
                this.EndDate == base_DevMakeMod.EndDate &&
                //判断objDate是否一致
                this.ObjDate == base_DevMakeMod.ObjDate &&
                //判断ctime是否一致
                this.Ctime == base_DevMakeMod.Ctime &&
                //判断PreKey是否一致
                this.PreKey == base_DevMakeMod.PreKey;
        }
        /// <summary>
        /// 将当前Base_DevMake数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_DevMake数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将id进行按位异或运算处理
                this.Id.GetHashCode() ^
                //将startDate进行按位异或运算处理
                this.StartDate.GetHashCode() ^
                //将endDate进行按位异或运算处理
                this.EndDate.GetHashCode() ^
                //将objDate进行按位异或运算处理
                this.ObjDate.GetHashCode() ^
                //将ctime进行按位异或运算处理
                this.Ctime.GetHashCode() ^
                //将PreKey进行按位异或运算处理
                (this.PreKey == null ? 2147483647 : this.PreKey.GetHashCode());
        }
        /// <summary>
        /// 将当前Base_DevMake数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_DevMake数据模型对象转换成字符串副本
            return
                "[" +
                //将id转换成字符串
                this.Id + "," +
                //将startDate转换成字符串
                this.StartDate + "," +
                //将endDate转换成字符串
                this.EndDate + "," +
                //将objDate转换成字符串
                this.ObjDate + "," +
                //将ctime转换成字符串
                this.Ctime +
                "]";
        }
    }
}
